package com.haolijun.eecms.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @ClassName HttpConverterConfig
 * @Description TODO
 * @Author hljstart
 * @Date 2023/3/12 22:06
 * @Version 1.0
 */
@Configuration
public class HttpConverterConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //其中image表示访问的前缀。"file:F:/img/"是文件真实的存储路径
        registry.addResourceHandler("/image/**").addResourceLocations("file:D:/file_image/");
    }
}
